package com.homework;


import java.util.Scanner;

public class demo04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入您想打印到的九九乘法表的数字:");
        int num = sc.nextInt();
        //外循环控制上限
        for (int i = 1; i <= num; i++) {
            //满足条件了就换行，开启新一轮外循环
            for (int j = 1; ; j++) {
                System.out.print(j + "*" + i + "=" + (j * i) + " ");
                if (i == j) {
                    System.out.println();
                    break;
                }
            }
        }
    }
}